<?php

abstract class PostFilter{

	/**
		This used in the Registry to wrap with any thing if needed before it gets written as echo..
		@param $payload the data what we are going to wrap 
		@param $registryObject is a global object which can be used to pass data between filters 
		including all the pre and post filters
		
		@return the wraped payload which is about to write				  
	*/
	abstract public function wrap($payload,$registryObject);
	
	/**
		This used in the Invoker to grab the response before it removes any Postfilter wraped extra headers
		@param $payload the data what we are going to unwrap 
		@param $registryObject is a global object which can be used to pass data between filters 
		including all the pre and post filters
		
		@return the unwraped payload which will be the json-rpc response				  
	*/
	abstract public function unwrap($payload,$registryObject);
	
}
